<template>
  <el-button type="primary" @click="downBoxPDF()" v-if="data.boxPDF" class="mgl10">下载箱标</el-button>
</template>

<script>

export default {
  name: "BoxPDFButton",
  props:{
    data: {
      type: Object,
      required: true,
      default: function(){
        return {};
      }
    }
  },
  data(){
    return {

    }
  },
  methods:{
    downBoxPDF(){
      const pdf = this.data.boxPDF;
      window.open(pdf,'_blank')
    },


  },
}
</script>

<style scoped lang="scss">

</style>
